/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.scalia.meteocal.gui;


import com.scalia.meteocal.control.UserManager;
import com.scalia.meteocal.entity.User;
import java.io.Serializable;
import javax.ejb.EJB;
import javax.inject.Named;
import javax.enterprise.context.RequestScoped;

/**
 *
 * @author miglie
 */
@Named
@RequestScoped
public class UserBean implements Serializable {

    @EJB
    UserManager um;
    
    public UserBean() {
    }
    
    public User getUser() {
        return um.getLoggedUser();
    }
    
    public String getNameSurname() {
        return um.getLoggedUser().getName() + " " + um.getLoggedUser().getSurname();
    }
    
}
